How to Make Great Data Visualisations

Aurélien Goutsmedt

ICHEC Brussels Management School

UC Louvain, ISPOLE

Thomas Laloux

UC Louvain, ISPOLE

May 13, 2025

What makes a great data visualisation?

One thing’s for sure: it’s never a pie chart…

What’s the plan for today?

  • General considerations
    • Not a list of rules to apply, but a series of issues to think about when producing visualisations
  • Practical data visualisation
    • Using ggplot2 in R
    • Putting the reflections of the first part in context

General Considerations

Healy (2018) Data Visualization: A Practical Introduction. Princeton University Press.

  • General discussion on common issues regarding data visualizations
  • Applications to social sciences
  • Focus on R package ggplot2 (Wickham, 2016)

Why visualizing data?

  • Exploring your data (identifying patterns and problems, etc…)
    • Extract information intuitively, efficiently, and accurately

  • Revealing relationships in your data
  • Communicating information with precision, in a concise way
  • Highlighting your main findings
  • A more sociological dimension: bolstering credibility
  • but, it is not sufficient to “look at data” for sound analysis—and it comes with some risks

Edward Tufte’s main principle

Graphical excellence is the well-designed presentation of interesting data—a matter of substance, of statistics, and of design. … [It] consists of complex ideas communicated with clarity, precision, and efficiency. … [It] is that which gives to the viewer the greatest number of ideas in the shortest time with the least ink in the smallest space. … [It] is nearly always multivariate. … And graphical excellence requires telling the truth about the data. (Tufte, 1983, p. 53)

Three hurdles to great data visualisation

  • Bad taste: unappealing aestethics and bad design
  • Bad data: misuse of data, errors or missing values, etc.
  • Perception issues: how people perceive and process what they are looking at differs depending on cognitive and contextual factors

Bad taste

  • Why it’s bad?
    • Duplicated information
    • Unnecessary complexity and design features
    • Difficulty to extract the information correctly

Bad data (use)

  • Why it’s bad?
    • cherry-picking of data
    • Misleading the audience
  • Multiply types of visualizations, vary scales, etc., to avoid cheating yourself

Perception issues: some examples

Perception issues: colors

  • Hue: What color is it?
    • Red, blue, green, yellow, etc.
  • Chroma (or Saturation): How pure or intense is the color?
    • washed-out or grayish vs. vivid or rich
  • Luminance (or Lightness/Brightness): How light or dark is the color?
    • close to white vs. close to black

Perception issues: shapes and scales

Perception issues: shapes and scales

Practical Data Visualisation with ggplot2

What is ggplot2 ?

  • ggplot2 is a data visualization package for R developed by Hadley Wickham (2016).
  • It lets you build complex plots from simple building blocks.
  • Inspired by the Grammar of Graphics (Wilkinson, 2011) — a system for describing and thinking about graphics.
    • A consistent syntax for building complex graphics by combining simple components
    • Shifts the focus from choosing predefined chart types to systematically defining what to show and how to show it.

Why should you use ggplot2?

  • Powerful and flexible
  • Grammar of Graphics:
    • Stems from a coherent logics of visualization, which helps to develop reflexivity
    • Customize almost every visual aspect
  • Intuitive syntax once you understand the grammar
  • Active community, extensive documentation, updates, and extension (packages)
  • Integrated with R and the tidyverse suite

ggplot2 examples

How ggplot2 Works

  • Plots as a combination of different layers
    • ggplot2 builds plots by layers, each layer adds a different component to the plot
    • The concept behind ggplot2 divides plot into three different fundamental parts: Plot = Data + Variable + Geometric Object.
    • Then you customize plot details (the theme) with elements e.g., the scales, grid, labels, and legends using specific functions
  • \(\Rightarrow\) Plots are built incrementally by adding components piece by piece

How ggplot2 Works: Three main Components

  • Data: The dataset used to generate the plot
  • Mapping (aesthetics): Specifies which variables from the dataset are mapped to visual properties like position, color, or size
  • Geom: Refers to the geometric objects (e.g., points, lines, bars) that represent data on the plot \(\Rightarrow\) This defines the type of plot you want to create.
    You can combine multiple geoms — for example, points with a regression line
  • Then the details can be refined!

Presenting the dataset : ISPOLE publications in DIAL

Rows: 2,779
Columns: 50
$ id                                 <chr> "boreal:281323", "boreal:299186", "boreal:292315", "boreal:300132", "boreal:295981", "boreal:295282", "boreal:299924", "boreal:293548", "boreal:297789", "boreal:291291", "boreal:239795", "boreal:298026", "…
$ type_de_publication                <chr> "Article de périodique (Journal article)", "Article de périodique (Journal article)", "Article de périodique (Journal article)", "Article de périodique (Journal article)", "Article de périodique (Journal a…
$ sous_type_de_publication           <chr> "Article de recherche", "Article de recherche", "", "Article de recherche", "Article de recherche", "Article de recherche", "", "", "Article de recherche", "Article de recherche", "Article de recherche", "…
$ sous_type_specifique               <chr> "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "…
$ annee                              <chr> "2025", "2025", "2025", "2025", "2025", "2025", "2025", "2024", "2024", "2024", "2024", "2024", "2024", "2024", "2024", "2024", "2024", "2024", "2024", "2024", "2024", "2024", "2024", "2024", "2024", "2024…
$ statut_de_publication              <chr> "Accepté/Sous presse", "Publié", "Accepté/Sous presse", "Publié", "Soumis", "Publié", "Publié", "Soumis", "Publié", "Soumis", "Publié", "Publié", "Publié", "Accepté/Sous presse", "Publié", "Publié", "Publi…
$ type_d_acces                       <chr> "Accès interdit", "Accès libre", "Accès restreint", "Accès libre", "", "Accès libre", "Accès libre", "", "Accès libre", "Accès embargo", "Accès restreint", "Accès libre", "Accès libre", "Accès libre", "Acc…
$ entite_s_departement_s             <chr> "UCL - SSH/SPLE - Institut de sciences politiques Louvain-Europe", "UCL - SSH/SPLE - Institut de sciences politiques Louvain-Europe", "UCL - SSH/SPLE - Institut de sciences politiques Louvain-Europe", "UCL…
$ auteur_s                           <chr> "Dehoux, Amaury", "Bocquet, Nicolas", "Bocquet, Nicolas ; de Buisseret Hardy, Emmanuelle ; Debailleul, Corentin ; Grosman, Jérémy ; Roy, Laurent", "Baele, Stephane J. ; Brace, Lewys ; Naserian, Elahe", "Ga…
$ editeur_s_directeur_s_scientifique <chr> "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "…
$ collaborateur_s                    <chr> "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "…
$ traducteur_s                       <chr> "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "…
$ prefacier_s                        <chr> "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "…
$ promoteur_s                        <chr> "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "…
$ titre                              <chr> "\"Comme nous existons\" de Kaoutar Harchi : un dialogue postmigrant avec Annie Ernaux", "Caught Between Privacy and Surveillance: Explaining the Long-Term Stagnation of Data Protection Regulation in Liber…
$ language                           <chr> "Français", "Anglais", "Français", "Anglais", "Anglais", "Anglais", "Anglais", "Français", "Anglais", "Anglais", "Anglais", "Anglais", "Anglais", "Anglais", "Anglais", "Français", "Anglais", "Anglais", "Fr…
$ editeur_commercial                 <chr> "", "Regulation & Governance", "", "The International Centre for Counter-Terrorism (ICCT)", "", "Wiley", "Informa UK Limited", "Presses Universitaires de France", "Springer Science and Business Media LLC",…
$ lieu_d_edition                     <chr> "", "Australia", "", "Den Haag", "", "", "", "Paris", "", "Oxford", "Thousand Oaks", "", "", "", "BRUXELLES", "", "UK", "", "", "Abingdon", "Alphen aan den Rijn", "", "Amsterdam", "", "", "Abingdon", "", "…
$ pagination                         <chr> "Vol. 79, no. 2, p. à paraître (2025)", "p. 1-16 (2025)", "", "Vol. 29, no.1, p. / (2025)", " (2025)", "(2025)", "Vol. /, no./, p. 1-21 (2025)", ", no.295, p. 65-83 (2024)", "Vol. 22, no.2, p. 115-135 (202…
$ doi                                <chr> "", "https://doi.org/10.1111/rego.12656", "10.3917/res.251.0179", "10.19165/2025.1559", "", "10.1111/ajps.12943", "10.1080/1057610x.2025.2480622", "", "10.1057/s41253-024-00244-5", "10.1093/isr/viae013", "…
$ url                                <chr> "http://hdl.handle.net/2078.1/281323", "http://hdl.handle.net/2078.1/299186", "http://hdl.handle.net/2078.1/292315", "http://hdl.handle.net/2078.1/300132", "http://hdl.handle.net/2078.1/295981", "http://hd…
$ url_pubmed                         <chr> "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "…
$ titre_du_periodique                <chr> "French Studies", "Regulation & Governance", "Réseaux", "Perspectives on Terrorism", "Journal of Elections, Public Opinion and Parties", "American Journal of Political Science", "Studies in Conflict &amp; …
$ titre_abrege                       <chr> "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "…
$ issn                               <chr> "0016-1128", "1748-5991", "1777-5809", "", "1745-7289", "0092-5853", "1057-610X", "0984-2292", "1476-3419", "1521-9488", "0049-1241", "2589-9929", "2210-4070", "2047-8844", "", "1761-0559", "0021-9886", "2…
$ eissn                              <chr> "1468-2931", "", "", "2334-3745", "1745-7297", "1540-5907", "1521-0731", "2101-0137", "1476-3427", "1468-2486", "1552-8294", "", "2210-4097", "2047-8852", "", "1761-0559", "1468-5965", "2589-9929", "", "21…
$ ponderation                        <chr> "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "…
$ peer_review                        <chr> "Peer-reviewed", "Peer-reviewed", "Peer-reviewed", "Peer-reviewed", "Peer-reviewed", "Peer-reviewed", "Peer-reviewed", "Peer-reviewed", "Peer-reviewed", "Peer-reviewed", "Peer-reviewed", "Peer-reviewed", "…
$ mention_d_edition                  <chr> "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "…
$ collection                         <chr> "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "…
$ isbn                               <chr> "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "…
$ auteur_s_de_l_ouvrage_hote         <chr> "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "…
$ titre_de_l_ouvrage_hote            <chr> "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "…
$ nom_lieu_date_de_la_conference     <chr> "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "…
$ jury                               <chr> "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "…
$ date_de_defense                    <chr> "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "…
$ pays_organisme_brevets             <chr> "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "…
$ numero_brevets                     <chr> "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "…
$ organisme_et_collection_rapport    <chr> "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "…
$ mot_s_cle_s                        <chr> "Harchi ¦ Ernaux ¦ Postmigration ¦ Littérature française ¦ Intersectionnalité", "data protection ¦ democracy ¦ governance ¦ privacy ¦ regulation ¦ surveillance", "Demande d’accès aux documents administrati…
$ mesh                               <chr> "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "…
$ jel                                <chr> "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "…
$ c_re_f                             <chr> "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "…
$ lc                                 <chr> "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "…
$ identifiants_institut_pole         <chr> "GLOBALIT", "", "", "", "", "", "", "ISPOLE", "CESPOL ¦ CMAP-POL", "", "CESPOL ¦ ISPOLE ¦ CMAP/POL", "", "climate crisis ¦ discourse ¦ religion", "SPLE/CESPOL", "", "CECRI", "CEE", "environment ¦ politics …
$ financement_institution            <chr> "", "", "", "", "", "", "", "", "", "", "European Research Council", "FNRS ¦ FWO ¦ FNRS ¦ FWO ¦ FNRS", "Université Catholque de Louvain", "", "", "", "FNRS", "", "", "", "Fonds de la Recherche Scientifique…
$ financement_subvention             <chr> "", "", "", "", "", "", "", "", "", "", "Qualidem", "Represent (G0F0218N) ¦ Represent (G0F0218N) ¦ NotLikeUs (RG3139) ¦ NotLikeUs (G0H0322N)", "From local to global environments: the implications of climat…
$ financement_programme              <chr> "", "", "", "", "", "", "", "", "", "", "Horizon 2020 research and innovation programme", "EOS ¦ EOS ¦ EOS ¦ EOS ¦ FRESH Grant", "FSR Incoming postdoc fellowship", "", "", "", "Aspirant", "", "", "", "Aspi…
$ financement_projet                 <chr> "", "", "", "", "", "", "", "", "", "", "Qualidem", "RepResent (G0F0218N) ¦ RepResent (G0F0218N) ¦ NotLikeUs (RG3139) ¦ NotLikeUs (G0H0322N)", "From local to global environments: the implications of climat…
$ n_titre                            <int> 83, 129, 187, 85, 95, 98, 77, 95, 127, 77, 62, 98, 83, 86, 71, 110, 127, 60, 92, 46, 69, 107, 82, 112, 92, 109, 79, 60, 23, 70, 50, 52, 61, 177, 58, 121, 47, 76, 105, 38, 139, 101, 68, 152, 101, 117, 133, …

Example Plot: Number of Publications by Year

Start with the data and the mapping:

ggplot(data = data_ispole, aes(x = annee))

Example Plot: Number of Publications by Year

Identify the Issue : Bad Encoding?

annee
Delreux, Tom;";";";";";One big conversation: the EU’s climate diplomacy across the international regime complex on climate change: the case of the Paris Agreement Negotiations.;Anglais;";";";";http://hdl.handle.net/2078.1/260592;";";";";";";";";";";";";The European Union in International Affairs, Online, du 26/05/2021 au 28/05/2021;";";";";";European Union ¦ climate diplomacy ¦ international climate politics;";";";";CEE;";";";" boreal:270632;Communication à un colloque (Conference Paper);Présentation orale avec comité de sélection;";2021;";";UCL - SSH/SPLE - Institut de sciences politiques Louvain-Europe;Squevin, Pierre Louis Daniel
Cambré, Bart
Rihoux, Benoît;";";";";";The impact of the Stemtest/Test électoral on voting in the Belgian general elections of 2019;Anglais;";";";";http://hdl.handle.net/2078.1/224165;";";";";";";";";";";";";the Eighth edition of the conference Belgium: The state of the federation, Bruxelles, 19/12/2019;";";";";";";";";";";CESPOL;";";";" boreal:224208;Communication à un colloque (Conference Paper);Présentation orale avec comité de sélection;";2019;";";UCL - SSH/SPLE - Institut de sciences politiques Louvain-Europe;Moyson, Stéphane;";";";";";The individual psychology of policy learning in the advocacy coalition framework: Information use, egocentrism and self-esteem in the European liberalization of Belgian network industries;Anglais;";";";";http://hdl.handle.net/2078.1/224208;";";";";";";";";";";";";General Conference of the European Consortium for Political Research (ECPR), Wroclaw, Poland, du 04/09/2019 au 07/09/2019;";";";";";CMAP/POL;";";";";SPLE;F.R.S.-FNRS;ECODEMO;PDR;ECODEMO boreal:222588;Communication à un colloque (Conference Paper);Présentation orale avec comité de sélection;";2019;";";UCL - SSH/SPLE - Institut de sciences politiques Louvain-Europe;Ait-Chaalal, Amine;";";";";";The interactions between globalization, inequality and (in)security in the European, African and Middle Eastern contexts: traditional views and new problems. ;Anglais;";";";";http://hdl.handle.net/2078.1/222588;";";";";";";";";";";";";New challenges for the 21st Century, Universidade de Brasilia , 02/10/2019;";";";";";Europe Middle East Africa International Relations;";";";";ISPOLE ¦ CECRI;";";";" boreal:243889;Communication à un colloque (Conference Paper);Présentation orale avec comité de sélection;";2019;";";UCL - SSH/SPLE - Institut de sciences politiques Louvain-Europe;André, Lyla;";";";";";The role of the EU as a leading donor in framing the humanitarian response to the Syrian “Refugee crisis” in Lebanon;Anglais;";";";";http://hdl.handle.net/2078.1/243889;";";";";";";";";";";";";EISA Annual Conference A Century of Show and Tell: The Seen and the Unseen of IR, Sofia, Bulgaria, du 10/09/2019 au 14/09/2019;";";";";";European Union - Humanitarian aid - Refugee protection;";";";";European Management Syrian refugee crisis;Université Catholique de Louvain;FSR;ISPOLE / Germac;"The Eu management of the Syrian refugee crisis" boreal:215145;Communication à un colloque (Conference Paper);Présentation orale avec comité de sélection;";2019;";Accès libre;UCL - SSH/SPLE - Institut de sciences politiques Louvain-Europe;Reuchamps,
Van Ingelgom, Virginie
mémoire
Burns, Charlotte;";";";";";The involvement of the European Parliament in UN climate negotiations;Anglais;";";";";http://hdl.handle.net/2078.1/200022;";";";";";";";";";";";";European Union in International Affairs VI, Brussels, du 16/05/2018 au 18/05/2018;";";";";";Climate change ¦ Climate Diplomacy ¦ Conference of the Parties (COP) ¦ European Parliament ¦ European Union ¦ parliamentarization ¦ United Nations Framework Convention on Climate Change (UNFCCC) ¦ climate change ¦ climate diplomacy ¦ Conference of the Parties ¦ European Parliament ¦ European Union ¦ parliamentarization ¦ Unitied Nations Framework Convention on Climate Change;";";";";CEE;";";";" boreal:200030;Communication à un colloque (Conference Paper);Présentation orale avec comité de sélection;";2018;";Accès restreint;UCL - SSH/SPLE - Institut de sciences politiques Louvain-Europe;Delreux, Tom
Dodeigne, Jérémy
Heyvaert, Pauline
Heyvaert, Pauline
Pellon, Gaëlle
Haarscher, Guy
Meier, Petra;";";";";";Is it male chauvinism, party affiliation or political apathy? Gender-based preferential voting in Belgium;Anglais;";";";";http://hdl.handle.net/2078.1/142239;";";";";";";";";";";";";ECPR Joint Sessions of Workshops, Mainz, du 11/03/2013 au 16/03/2013;";";";";";";";";";";";";";";" boreal:138427;Communication à un colloque (Conference Paper);Présentation orale avec comité de sélection;";2013;";";UCL - SSH/SPLE - Institut de sciences politiques Louvain-Europe;Rosoux, Valérie;";";";";";Is reconciliation negotiable ?;Anglais;";";";";http://hdl.handle.net/2078.1/138427;";";";";";";";";";";";";Conférence organisée par le Durham Global Security Institute (DGSI), Durham;";";";";";";";";";";";";";";" boreal:142882;Communication à un colloque (Conference Paper);Présentation orale avec comité de sélection;";2013;";Accès libre;UCL - SSH/SPLE - Institut de sciences politiques Louvain-Europe;Laborderie, Vincent;";";";";";Judging the hypothesis of a ‘Break-up’ of Federal Belgium : comparative perspectives;Anglais;";";";";http://hdl.handle.net/2078.1/142882;";";";";";";";";";";";";State of the Federation, Louvain-la-Neuve, 18/10/2013;";";";";";Belgique ¦ Flandre ¦ Séparatisme ¦ Indépendance ¦ Reconnaissance internationale;";";";";ISPOLE;";";";" boreal:136089;Communication à un colloque (Conference Paper);Présentation orale avec comité de sélection;";2013;";";UCL - SSH/SPLE - Institut de sciences politiques Louvain-Europe;Gijs, Anne-Sophie;";";";";";La Belgique et l'anticommunisme au Congo (1945-1961): une histoire aux répercussions bilatérales et internationales;Français;";";";";http://hdl.handle.net/2078.1/136089;";";";";";";";";";";";";Workshop: Current Perspectives in Congo Research, Université Saint-Louis, Bruxelles, 20/12/2013;";";";";";";";";";";";";";";" boreal:134050;Communication à un colloque (Conference Paper);";";2013;";Accès interdit;UCL - SSH/LouRIM - Louvain Research Institute in Management and Organizations ¦ UCL - SSH/SPLE - Institut de sciences politiques Louvain-Europe;Raone, Julien

Example Plot: Number of Publications by Year

(re)Start with the data and the mapping:

data_ispole %>%
  mutate(annee = as.numeric(annee)) %>%
  ggplot(aes(x = annee))

Example Plot: Number of Publications by Year

Now add the geom

data_ispole %>%
  mutate(annee = as.numeric(x = annee)) %>%
  ggplot(data = ., aes(x = annee)) +
  geom_bar()

Example Plot: Number of Publications by Year

Choose another geom

data_ispole %>%
  mutate(annee = as.numeric(annee)) %>%
  ggplot(aes(x = annee)) +
  geom_boxplot()

Example Plot: Number of Publications by Year

Now add another mapping

data_ispole %>%
  mutate(annee = as.numeric(annee)) %>%
  ggplot(data = ., aes(x = annee, fill = peer_review)) +
  geom_bar()

Example Plot: Number of Publications by Year

Now add the details

  • First, install some useful extensions to ggplot2
library(ggpubr) # additional themes
library(hrbrthemes) # additional themes
library(ggsci) # additional color palettes
library(see) # additional color palettes
library(gghighlight) # highlighting features

data_ispole <- data_ispole %>% 
  mutate(annee = as.numeric(annee))

Example Plot: Number of Publications by Year

Now add the details

data_ispole %>%
  ggplot(data = ., aes(x = annee)) +
  geom_bar(fill = "darkseagreen", color = "black") +
  scale_x_continuous(breaks = c(2010, 2024)) +
  theme(panel.grid.major.y = element_line(color = "black", linetype = "dashed"),
        panel.grid.minor.y = element_line(color = "red", linetype = "dotted"))

Example Plot: Number of Publications by Year

Now add the details

ggplot(data = data_ispole, aes(x = annee)) +
  geom_bar(fill = "darkseagreen", color = "black") +
  theme_pubclean() +
  theme(plot.title = element_text(size = 20, hjust = 0.5)) +
  labs(x = NULL, y = NULL, title = "Evolution of ISPOLE's Publication Activity Over Time")

Title Length Across Publication Types

  • What would be a good way to visualize this?
type_de_publication n_titre
Article de périodique (Journal article) :999 Min. : 0.00
Communication à un colloque (Conference Paper) :693 1st Qu.: 53.00
Contribution à ouvrage collectif (Book Chapter):650 Median : 78.00
Monographie (Book) :162 Mean : 86.05
Document de travail (Working Paper) :151 3rd Qu.: 108.00
Thèse (Dissertation) : 79 Max. :3431.00
(Other) : 45 NA

Title Length Across Publication Types

ggplot(data = data_ispole, aes(x = type_de_publication, y = n_titre))

Visualizing Title Length Across Publication Types

  • Visualize the data through a boxplot
ggplot(data = data_ispole, aes(x = type_de_publication, y = n_titre)) +
  geom_boxplot() +
  theme_pubclean()

  • How could we improve this plot?

Visualizing Title Length Across Publication Types

plot <- data_ispole2 %>%
  mutate(
    type_de_publication_fr = str_replace(type_de_publication, " \\s*\\([^\\)]+\\)", ""),
    type_de_publication_en = gsub("(?<=\\()[^()]*(?=\\))(*SKIP)(*F)|.", "", type_de_publication, perl = T)
  ) %>%
  ggplot(aes(x = reorder(type_de_publication_en, n_titre), y = n_titre, fill = reorder(type_de_publication_en, n_titre))) +
  geom_boxplot(show.legend = F) +
  theme_pubclean(base_family = "Century Gothic") +
  coord_flip() +
  scale_y_continuous(name = "Number of Words in Titles", expand = c(0, 0)) +
  theme(
    axis.title.y = element_blank(),
    panel.grid.major.y = element_blank(),
    panel.grid.major.x = element_line(color = "grey", linetype = "dotted"),
    plot.title.position = "plot", # Align relative to full plot area
    plot.title = element_text(hjust = 0)
  ) +
  scale_fill_oi() +
  ggtitle("Number of words in the title according to the type of Publication")
plot

Visualizing Title Length Across Publication Types

  • Spot the modifications!

Visualizing Title Length Across Publication Types

  • Add faceting by another variable (and another geom)

Visualizing Title Length Across Publication Types

  • Add faceting by another variable (and another geom)
plot +
  geom_jitter(show.legend = F, alpha = 0.5, shape = 21, size = 0.2) +
  facet_wrap(. ~ peer_review) +
  theme_ipsum(base_family = "Century Gothic") +
  theme(
    axis.title.y = element_blank(),
    plot.title.position = "plot", # Align relative to full plot area
    plot.title = element_text(hjust = 0)
  )

General Rule

  • (Almost) always use faceting when showing differences across a variable

General Rule

Exercice

On Paper (No Computers)

  • How would you visualize the relationship between the number of conference papers and the number of published outputs (books, journal articles, and book chapters)?

  • How would you compare peer-reviewed and non–peer-reviewed publications in this context?

  • In both cases, how would you structure your ggplot2 code accordingly?

Exercice

Exercice

References

Healy, K. (2018). Data visualization: A practical introduction. Princeton University Press.
Tufte, E. R. (1983). The Visual Display of Quantitative Information (1st edition). Graphics Press USA.
Wickham, H. (2016). ggplot2: Elegant graphics for data analysis. Springer-Verlag New York. https://ggplot2.tidyverse.org
Wilkinson, L. (2011). The grammar of graphics. In Handbook of computational statistics: Concepts and methods (pp. 375–414). Springer.